<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/bootstrap.css">
</head>
<body>
    <br></br>
    <h1>当前用户：Admin</h1>
    <div>
        <img src="..\static\img\3.png" width="350" height="350" alt="">
    </div>
<table class="table" style="width: 800px;margin: 150px auto">
    <thead>
    <tr>
        <th scope="col">主体</th>
        <th scope="col">客体</th>
        <th scope="col">主体安全许可</th>
        <th scope="col">客体安全等级</th>
        <th scope="col">拥有权限</th>
    </tr>
    </thead>
    <tbody>
    {#
        需要将 Python 对象的数据显示到浏览器上，模板语法
        jinja2(flask) numjucks(javascript) moka(django) vue

        jinja2 可以直接在 html 中写 python 的逻辑
    #}
    
    {% for init_info in info %}
        <tr>
            <th>{{ init_info.sub }}</th>
            <td>{{ init_info.obj }}</td>
            <td>{{ init_info.sub_level }}</td>
            <td>{{ init_info.obj_level }}</td>
            <td>{{ init_info.policy }}</td>
            <td><a href="/delete?sub={{ init_info.sub}}&obj={{init_info.obj}}">删除</a>  
        </tr>
    {% endfor %}
    </tbody>
 
</table>

<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/add">新增主客体安全等级信息</a>
        </div>
    </div>
</div>
<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/change">修改主体安全许可</a>
        </div>
    </div>
</div>
<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/change1">修改客体安全等级</a>
        </div>
    </div>
</div>
<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/read">读取文件内容</a>
        </div>
    </div>
</div>

<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/change2">修改文件内容</a>
        </div>
    </div>
</div>

<div class="container" style="width: 600px;margin: 10px auto">
    
    <div class="row">
        <div class="col-4">
            <a href="/login">切换角色控制策略</a>
        </div>
    </div>
</div>

<div>
    <img src="..\static\img\2.png" width="350" height="350" align="right" alt="">
</div>
<br></br>
</body>
</html>